package com.soft.entity;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 实体：用户（表 user）
 * 用途：存储系统用户的基础资料与角色信息。
 * 说明：当前鉴权采用简化方案，通过前端传递 X-User-Id 标头进行后端识别。
 */
@TableName("user")
public class User {
     // 主键，自增
    @TableId(type = IdType.AUTO)
    private Integer userId;
    
     // 用户名
    private String username;
    
     // 登录密码（支持明文->BCrypt 平滑迁移，详见服务层）
    private String password;
    
     // 昵称
    private String nickname;
    
     // 邮箱
    private String email;
    
     // 手机号
    private String phone;
    
     // 角色：admin/user 等
    private String role;
    
     // 状态：active/disabled 等
    private String status;
    
     // 创建时间
    private LocalDateTime createTime;

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}
